package com.ruoyi.shop.mapper;

import java.util.List;
import com.ruoyi.shop.domain.ShopUserOrder;
import com.ruoyi.shop.domain.ShopUserOrderItem;
import org.apache.ibatis.annotations.Param;

/**
 * 订单Mapper接口
 * 
 * @author Alan Zhang
 * @date 2021-09-14
 */
public interface ShopUserOrderMapper 
{
    /**
     * 查询订单
     * 
     * @param id 订单主键
     * @return 订单
     */
    public ShopUserOrder selectShopUserOrderById(Long id);

    /**
     * 查询订单列表
     * 
     * @param shopUserOrder 订单
     * @return 订单集合
     */
    public List<ShopUserOrder> selectShopUserOrderList(ShopUserOrder shopUserOrder);

    /**
     * 新增订单
     * 
     * @param shopUserOrder 订单
     * @return 结果
     */
    public int insertShopUserOrder(ShopUserOrder shopUserOrder);

    /**
     * 修改订单
     * 
     * @param shopUserOrder 订单
     * @return 结果
     */
    public int updateShopUserOrder(ShopUserOrder shopUserOrder);

    /**
     * 删除订单
     * 
     * @param id 订单主键
     * @return 结果
     */
    public int deleteShopUserOrderById(Long id);

    /**
     * 批量删除订单
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteShopUserOrderByIds(String[] ids);

    /**
     * 批量删除订单明细
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteShopUserOrderItemByOrderIds(String[] ids);


    /**
     * 删除订单明细
     *
     * @param id 需要删除的数据主键
     * @return 结果
     */
    public int deleteShopUserOrderItemByOrderId(Long id);

    /**
     * 批量新增订单明细
     *
     * @param shopUserOrderItemList 订单明细列表
     * @return 结果
     */
    public int batchShopUserOrderItem(List<ShopUserOrderItem> shopUserOrderItemList);

    /**
     * 根据订单号查询订单
     * @param orderNo
     * @return
     */
    public ShopUserOrder selectShopUserOrderByOrderNo(String orderNo);

    /**
     * 修改订单备注
     * @param id
     * @param remark
     * @return
     */
    public int updateShopUserOrderRemark(@Param("id") Long id, @Param("remark") String remark);
}
